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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: B = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

b.x = g
b.p = c
c.u = f
c.y = d
k.t = c
k.x = c
k.s = d
d.y = g
f.w = k
f.t = l
f.p = e
f.o = m
m.r = b
m.y = g
m.u = f
m.o = k
g.x = b
g.p = c
l.r = g
l.y = g
l.u = e
l.o = k
e.w = k
e.t = m
e.p = f
e.o = l
assert c.u.t.o.s.y.p.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: B = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

b.x = g
b.p = c
c.u = f
c.y = d
k.t = c
k.x = c
k.s = d
d.y = g
f.w = k
f.t = l
f.p = e
f.o = m
m.r = b
m.y = g
m.u = f
m.o = k
g.x = b
g.p = c
l.r = g
l.y = g
l.u = e
l.o = k
e.w = k
e.t = m
e.p = f
e.o = l
assert c.u.t.o.s.y.p.y.y.txt == "g"