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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: B = None
        self.txt = txt

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

d.r = n
d.s = g
h.y = i
h.s = i
h.r = a
h.o = a
h.w = a
h.u = d
a.v = g
a.z = g
a.x = n
a.y = l
l.t = a
l.r = a
i.q = c
i.w = l
g.q = c
g.o = h
m.t = a
m.r = a
c.y = i
c.s = i
c.r = a
c.o = a
c.w = a
c.u = d
n.r = d
n.s = g
assert a.v.o.r.y.r.x.s.q.txt == "
class A:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: B = None
        self.txt = txt

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

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