class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: D = None
        self.r: G = None
        self.s: D = None
        self.x: C = None
        self.y: E = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: E = None
        self.y: B = None
        self.t: B = None
        self.u: G = None
        self.s: D = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: C = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: D = None
        self.v: D = None
        self.txt = txt

b = A("b")
n = B("n")
g = C("g")
a = D("a")
f = E("f")
i = F("i")
d = G("d")

b.z = f
b.y = f
b.u = f
b.o = a
b.s = a
b.r = d
b.x = g
n.q = d
n.x = b
g.x = i
g.w = f
g.y = n
g.t = n
g.u = d
g.s = a
g.z = b
a.o = f
a.q = g
a.p = g
a.t = g
a.y = b
a.u = n
f.q = i
f.p = g
f.s = a
i.r = g
i.s = g
d.p = a
d.t = a
d.v = a
assert g.u.v.o.q.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: D = None
        self.r: G = None
        self.s: D = None
        self.x: C = None
        self.y: E = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: E = None
        self.y: B = None
        self.t: B = None
        self.u: G = None
        self.s: D = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: C = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: D = None
        self.v: D = None
        self.txt = txt

b = A("b")
n = B("n")
g = C("g")
a = D("a")
f = E("f")
i = F("i")
d = G("d")

b.z = f
b.y = f
b.u = f
b.o = a
b.s = a
b.r = d
b.x = g
n.q = d
n.x = b
g.x = i
g.w = f
g.y = n
g.t = n
g.u = d
g.s = a
g.z = b
a.o = f
a.q = g
a.p = g
a.t = g
a.y = b
a.u = n
f.q = i
f.p = g
f.s = a
i.r = g
i.s = g
d.p = a
d.t = a
d.v = a
assert g.u.v.o.q.txt == "i"