class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.x: A = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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