class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: D = None
        self.y: G = None
        self.w: A = None
        self.o: H = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: C = None
        self.y: D = None
        self.w: F = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: D = None
        self.y: G = None
        self.w: A = None
        self.o: H = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: C = None
        self.y: D = None
        self.w: F = None
        self.z: D = None
        self.txt = txt

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

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