class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: C = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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