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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

b.p = e
b.y = d
g.v = f
g.w = e
g.u = k
g.o = k
g.p = d
e.w = g
e.u = d
e.z = h
e.v = b
e.y = c
i.u = h
i.w = g
i.t = k
h.s = b
h.w = b
h.y = b
h.r = c
h.u = f
h.o = f
d.p = k
k.v = d
k.p = d
k.w = e
k.u = g
k.o = g
c.w = k
c.u = d
c.z = h
c.v = b
c.y = e
f.p = k
assert f.p.v.p.w.z.s.txt == "b"