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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: A = None
        self.x: B = None
        self.v: A = None
        self.y: B = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: G = None
        self.w: B = None
        self.p: B = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: G = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: E = None
        self.z: G = None
        self.r: C = None
        self.p: G = None
        self.q: D = None
        self.s: A = None
        self.v: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: A = None
        self.x: B = None
        self.v: A = None
        self.y: B = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: G = None
        self.w: B = None
        self.p: B = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: G = None
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: E = None
        self.z: G = None
        self.r: C = None
        self.p: G = None
        self.q: D = None
        self.s: A = None
        self.v: G = None
        self.txt = txt

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

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