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

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

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

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

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

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

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

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

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

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

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

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

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

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

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