class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: F = None
        self.r: C = None
        self.o: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: A = None
        self.y: E = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: E = None
        self.y: F = None
        self.x: E = None
        self.s: A = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: A = None
        self.y: E = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: E = None
        self.y: F = None
        self.x: E = None
        self.s: A = None
        self.z: E = None
        self.txt = txt

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

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