class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: D = None
        self.p: E = None
        self.v: D = None
        self.q: H = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: E = None
        self.w: F = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: B = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: C = None
        self.s: H = None
        self.o: G = None
        self.t: G = None
        self.p: H = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: D = None
        self.r: D = None
        self.p: E = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

g = A("g")
j = B("j")
k = C("k")
b = D("b")
n = E("n")
i = F("i")
e = G("e")
c = H("c")

g.u = i
g.y = i
g.r = b
g.v = b
g.p = n
g.q = c
j.z = n
j.u = n
j.w = i
j.o = i
k.y = b
k.z = j
k.s = e
b.v = c
n.w = g
n.y = k
n.s = c
n.p = c
n.o = e
n.t = e
n.v = e
i.t = c
i.s = b
i.r = b
i.q = b
i.p = n
i.x = k
e.u = b
c.y = e
assert i.t.y.u.v.y.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: D = None
        self.p: E = None
        self.v: D = None
        self.q: H = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: E = None
        self.w: F = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: B = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: C = None
        self.s: H = None
        self.o: G = None
        self.t: G = None
        self.p: H = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: D = None
        self.r: D = None
        self.p: E = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

g = A("g")
j = B("j")
k = C("k")
b = D("b")
n = E("n")
i = F("i")
e = G("e")
c = H("c")

g.u = i
g.y = i
g.r = b
g.v = b
g.p = n
g.q = c
j.z = n
j.u = n
j.w = i
j.o = i
k.y = b
k.z = j
k.s = e
b.v = c
n.w = g
n.y = k
n.s = c
n.p = c
n.o = e
n.t = e
n.v = e
i.t = c
i.s = b
i.r = b
i.q = b
i.p = n
i.x = k
e.u = b
c.y = e
assert i.t.y.u.v.y.u.txt == "b"