class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: G = None
        self.o: C = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: B = None
        self.u: D = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: F = None
        self.u: G = None
        self.txt = txt

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

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

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

f = A("f")
g = B("g")
e = C("e")
b = D("b")
i = E("i")
n = F("n")
c = G("c")
a = F("a")
j = D("j")
h = G("h")

f.p = e
f.o = e
f.u = e
f.z = c
g.v = f
e.r = b
e.u = b
e.p = g
e.v = g
b.o = j
b.x = a
b.u = c
i.w = h
n.t = i
n.v = g
n.s = h
c.r = i
c.w = g
c.s = g
c.u = g
c.z = h
a.t = i
a.v = g
a.s = h
j.o = b
j.x = n
j.u = h
h.r = i
h.w = g
h.s = g
h.u = g
h.z = c
assert e.p.v.z.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: G = None
        self.o: C = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: B = None
        self.u: D = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: F = None
        self.u: G = None
        self.txt = txt

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

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

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

f = A("f")
g = B("g")
e = C("e")
b = D("b")
i = E("i")
n = F("n")
c = G("c")
a = F("a")
j = D("j")
h = G("h")

f.p = e
f.o = e
f.u = e
f.z = c
g.v = f
e.r = b
e.u = b
e.p = g
e.v = g
b.o = j
b.x = a
b.u = c
i.w = h
n.t = i
n.v = g
n.s = h
c.r = i
c.w = g
c.s = g
c.u = g
c.z = h
a.t = i
a.v = g
a.s = h
j.o = b
j.x = n
j.u = h
h.r = i
h.w = g
h.s = g
h.u = g
h.z = c
assert e.p.v.z.txt == "c"