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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: A = None
        self.o: A = None
        self.w: A = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: A = None
        self.o: A = None
        self.w: A = None
        self.t: B = None
        self.txt = txt

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

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

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

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