class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: F = None
        self.t: C = None
        self.p: D = None
        self.o: D = None
        self.u: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: B = None
        self.x: C = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: B = None
        self.x: C = None
        self.s: B = None
        self.txt = txt

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

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

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