class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

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

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

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

b = A("b")
k = B("k")
i = C("i")
f = D("f")
d = E("d")
c = F("c")
j = C("j")
m = C("m")

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

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

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

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

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

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

b = A("b")
k = B("k")
i = C("i")
f = D("f")
d = E("d")
c = F("c")
j = C("j")
m = C("m")

b.r = c
k.y = c
i.p = k
i.y = k
i.o = f
i.u = j
i.w = b
i.s = b
f.w = d
d.y = f
d.t = f
d.p = k
d.u = c
d.w = c
c.v = k
c.x = d
c.t = d
j.p = k
j.y = k
j.o = f
j.u = m
j.w = b
j.s = b
m.p = k
m.y = k
m.o = f
m.u = i
m.w = b
m.s = b
assert j.y.y.v.y.x.y.txt == "f"