class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: G = None
        self.p: E = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: G = None
        self.q: G = None
        self.u: D = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: A = None
        self.v: C = None
        self.x: B = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: B = None
        self.w: D = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: E = None
        self.v: H = None
        self.u: D = None
        self.t: B = None
        self.z: C = None
        self.o: H = None
        self.txt = txt

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

b = A("b")
l = B("l")
e = C("e")
f = D("f")
h = E("h")
m = F("m")
j = G("j")
c = H("c")

b.v = l
b.u = j
b.p = h
b.x = c
l.u = f
e.w = f
e.u = f
e.v = j
e.q = j
e.p = j
f.w = m
f.q = b
f.v = e
f.x = l
f.z = j
h.o = c
h.u = l
h.p = l
h.w = f
m.z = e
j.w = e
j.z = e
j.r = h
j.v = c
j.o = c
j.u = f
j.t = l
c.w = l
c.r = f
c.z = f
c.y = m
c.u = b
c.s = j
c.p = j
assert f.q.v.u.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: G = None
        self.p: E = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: G = None
        self.q: G = None
        self.u: D = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: A = None
        self.v: C = None
        self.x: B = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: B = None
        self.w: D = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: E = None
        self.v: H = None
        self.u: D = None
        self.t: B = None
        self.z: C = None
        self.o: H = None
        self.txt = txt

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

b = A("b")
l = B("l")
e = C("e")
f = D("f")
h = E("h")
m = F("m")
j = G("j")
c = H("c")

b.v = l
b.u = j
b.p = h
b.x = c
l.u = f
e.w = f
e.u = f
e.v = j
e.q = j
e.p = j
f.w = m
f.q = b
f.v = e
f.x = l
f.z = j
h.o = c
h.u = l
h.p = l
h.w = f
m.z = e
j.w = e
j.z = e
j.r = h
j.v = c
j.o = c
j.u = f
j.t = l
c.w = l
c.r = f
c.z = f
c.y = m
c.u = b
c.s = j
c.p = j
assert f.q.v.u.z.txt == "j"