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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: F = None
        self.v: C = None
        self.u: C = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

l = A("l")
g = B("g")
e = C("e")
k = D("k")
c = E("c")
h = F("h")
j = D("j")

l.r = g
l.w = g
l.y = h
g.w = h
g.o = k
g.s = e
e.x = h
e.r = h
e.p = g
e.v = c
e.q = k
k.y = g
k.s = c
k.u = l
c.w = e
c.v = e
c.u = e
c.x = h
c.t = k
h.x = j
j.y = g
j.s = c
j.u = l
assert l.w.o.y.s.p.o.u.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: B = None
        self.y: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: F = None
        self.v: C = None
        self.u: C = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

l = A("l")
g = B("g")
e = C("e")
k = D("k")
c = E("c")
h = F("h")
j = D("j")

l.r = g
l.w = g
l.y = h
g.w = h
g.o = k
g.s = e
e.x = h
e.r = h
e.p = g
e.v = c
e.q = k
k.y = g
k.s = c
k.u = l
c.w = e
c.v = e
c.u = e
c.x = h
c.t = k
h.x = j
j.y = g
j.s = c
j.u = l
assert l.w.o.y.s.p.o.u.txt == "l"