class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: B = None
        self.v: E = None
        self.r: C = None
        self.y: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: C = None
        self.p: C = None
        self.txt = txt

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

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

h = A("h")
j = B("j")
l = C("l")
d = D("d")
g = E("g")
c = F("c")
a = C("a")
i = F("i")
k = A("k")
m = B("m")

h.z = g
h.v = g
h.y = g
h.x = j
h.r = a
j.s = i
j.r = d
l.p = c
l.w = i
l.v = g
l.o = g
d.v = k
d.w = a
d.p = a
g.q = d
g.u = c
g.y = i
c.u = g
c.s = g
c.y = h
c.w = i
c.x = d
a.p = c
a.w = c
a.v = g
a.o = g
i.u = g
i.s = g
i.y = k
i.w = c
i.x = d
k.z = g
k.v = g
k.y = g
k.x = m
k.r = l
m.s = i
m.r = d
assert h.x.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: B = None
        self.v: E = None
        self.r: C = None
        self.y: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: C = None
        self.p: C = None
        self.txt = txt

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

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

h = A("h")
j = B("j")
l = C("l")
d = D("d")
g = E("g")
c = F("c")
a = C("a")
i = F("i")
k = A("k")
m = B("m")

h.z = g
h.v = g
h.y = g
h.x = j
h.r = a
j.s = i
j.r = d
l.p = c
l.w = i
l.v = g
l.o = g
d.v = k
d.w = a
d.p = a
g.q = d
g.u = c
g.y = i
c.u = g
c.s = g
c.y = h
c.w = i
c.x = d
a.p = c
a.w = c
a.v = g
a.o = g
i.u = g
i.s = g
i.y = k
i.w = c
i.x = d
k.z = g
k.v = g
k.y = g
k.x = m
k.r = l
m.s = i
m.r = d
assert h.x.s.y.txt == "k"