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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: C = None
        self.t: D = None
        self.s: E = None
        self.x: E = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: C = None
        self.t: D = None
        self.s: E = None
        self.x: E = None
        self.r: B = None
        self.txt = txt

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

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

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