class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: E = None
        self.y: C = None
        self.o: E = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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