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

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: F = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: A = None
        self.q: G = None
        self.t: B = None
        self.o: F = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: A = None
        self.t: C = None
        self.q: A = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: E = None
        self.y: D = None
        self.w: B = None
        self.v: E = None
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: F = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: A = None
        self.q: G = None
        self.t: B = None
        self.o: F = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: A = None
        self.t: C = None
        self.q: A = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: E = None
        self.y: D = None
        self.w: B = None
        self.v: E = None
        self.q: E = None
        self.txt = txt

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

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