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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: E = None
        self.q: A = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: B = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: B = None
        self.t: A = None
        self.p: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: E = None
        self.txt = txt

d = A("d")
i = B("i")
c = C("c")
g = D("g")
h = E("h")
b = F("b")
f = G("f")
k = A("k")
l = D("l")
j = C("j")

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: E = None
        self.q: A = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: B = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: B = None
        self.t: A = None
        self.p: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: E = None
        self.txt = txt

d = A("d")
i = B("i")
c = C("c")
g = D("g")
h = E("h")
b = F("b")
f = G("f")
k = A("k")
l = D("l")
j = C("j")

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