class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: E = None
        self.q: D = None
        self.t: B = None
        self.r: D = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: F = None
        self.o: E = None
        self.y: B = None
        self.s: E = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: F = None
        self.o: E = None
        self.y: B = None
        self.s: E = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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